<?php 
namespace Admin\Controller;

class SoliloController extends AdminController{

	public function index(){
		$data = new \Think\Model();
		$result = $data->query('select id,name,solilo,uid,sstatus from love_userinfo');
		var_dump($result);
		$this->assign('list',$result);
		$this->display();
	}

	public function review(){
		$id = I('get.id/d',0);
		$ss = I('get.ss/d');
		M('userinfo')->sstatus = $ss;
		if(M('userinfo')->where("id=$id")->save()>0){
			/*echo M('userinfo')->getLastSql();*/
			$this->success('审核成功！',U('index'));
		}else{
			/*echo M('userinfo')->getLastSql();*/
			$this->error('审核失败，请重新审核！');
		}


	}

	public function delete(){
		$id = I('get.id/d',0);
		M('userinfo')->sstatus = 0;
		M('userinfo')->solilo = '';
		if(M('userinfo')->where("id=$id")->save()>0){
			$this->success('删除成功！');
		}else{
			$this->error('删除失败！');
		}

	}


}